package com.ktgj.customer.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.customer.mapper.MallActivityOrderMapper;
import com.ktgj.customer.domain.MallActivityOrder;
import com.ktgj.customer.service.IMallActivityOrderService;

/**
 * 活动订单,暂时团单使用Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-05-30
 */
@Service
public class MallActivityOrderServiceImpl implements IMallActivityOrderService 
{
    @Autowired
    private MallActivityOrderMapper mallActivityOrderMapper;

    /**
     * 查询活动订单,暂时团单使用
     * 
     * @param activityOrderId 活动订单,暂时团单使用ID
     * @return 活动订单,暂时团单使用
     */
    @Override
    public MallActivityOrder selectMallActivityOrderById(Long activityOrderId)
    {
        return mallActivityOrderMapper.selectMallActivityOrderById(activityOrderId);
    }

    /**
     * 查询活动订单,暂时团单使用列表
     * 
     * @param mallActivityOrder 活动订单,暂时团单使用
     * @return 活动订单,暂时团单使用
     */
    @Override
    public List<MallActivityOrder> selectMallActivityOrderList(MallActivityOrder mallActivityOrder)
    {
        return mallActivityOrderMapper.selectMallActivityOrderList(mallActivityOrder);
    }

    /**
     * 新增活动订单,暂时团单使用
     * 
     * @param mallActivityOrder 活动订单,暂时团单使用
     * @return 结果
     */
    @Override
    public int insertMallActivityOrder(MallActivityOrder mallActivityOrder)
    {
        mallActivityOrder.setCreateTime(DateUtils.getNowDate());
        return mallActivityOrderMapper.insertMallActivityOrder(mallActivityOrder);
    }

    /**
     * 修改活动订单,暂时团单使用
     * 
     * @param mallActivityOrder 活动订单,暂时团单使用
     * @return 结果
     */
    @Override
    public int updateMallActivityOrder(MallActivityOrder mallActivityOrder)
    {
        mallActivityOrder.setUpdateTime(DateUtils.getNowDate());
        return mallActivityOrderMapper.updateMallActivityOrder(mallActivityOrder);
    }

    /**
     * 批量删除活动订单,暂时团单使用
     * 
     * @param activityOrderIds 需要删除的活动订单,暂时团单使用ID
     * @return 结果
     */
    @Override
    public int deleteMallActivityOrderByIds(Long[] activityOrderIds)
    {
        return mallActivityOrderMapper.deleteMallActivityOrderByIds(activityOrderIds);
    }

    /**
     * 删除活动订单,暂时团单使用信息
     * 
     * @param activityOrderId 活动订单,暂时团单使用ID
     * @return 结果
     */
    @Override
    public int deleteMallActivityOrderById(Long activityOrderId)
    {
        return mallActivityOrderMapper.deleteMallActivityOrderById(activityOrderId);
    }
}
